home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 47 / Amiga Format AFCD47 (Issue 131, Xmas 1999).iso / -serious- / emulation / electrostatic / install electrostatic < prev    next >
Text File  |  1999-10-04  |  3KB  |  125 lines

  1. ; Installer for Electrostatic. V1.1.
  2. ; Copyright © 1999 Neil Cafferkey.
  3. ; $VER: "Install Electrostatic" 1.1 (17.6.99)
  4.  
  5.  
  6. ; Set constants
  7.  
  8. (set #kick-too-low-msg "Kickstart 3.0 or greater is required.")
  9. (set #askdir-prompt
  10.    "Where should %s be installed?\nA new drawer will be created there."
  11. )
  12. (set #dest-exists-msg "\"%s\" already exists.")
  13. (set #ask-joyride-prompt
  14.    (cat "Where do you want JoyRide, the joystick-handling Commodity,"
  15.       " to be installed?"
  16.    )
  17. )
  18. (set #ask-joyride-help
  19.    (cat "If you select \"SYS:WBStartup\", JoyRide will always be running,"
  20.       " but it may clash with other programs that use the joystick. If you"
  21.       " select \"SYS:Tools/Commodities\", you'll have to manually start"
  22.       " JoyRide before using a game translated by Electrostatic. Select"
  23.       " \"Nowhere\" if JoyRide is already installed."
  24.    )
  25. )
  26. (set #joyride-choice-0 "SYS:WBStartup")
  27. (set #joyride-choice-1 "SYS:Tools/Commodities")
  28. (set #joyride-choice-2 "Nowhere")
  29.  
  30. ; Check Kickstart version
  31.  
  32. (if (< (/ (getversion) 65536) 39)
  33.    (abort #kick-too-low-msg)
  34. )
  35.  
  36.  
  37. ; Ask where to install to
  38.  
  39. (set #default-dest
  40.    (tackon
  41.       (askdir
  42.          (prompt (#askdir-prompt @app-name))
  43.          (default @default-dest)
  44.          (help @askdir-help)
  45.          (disk)
  46.       )
  47.       @app-name
  48.    )
  49. )
  50.  
  51. (set @default-dest #default-dest)
  52.  
  53.  
  54. ; Check that destination directory doesn't already exist and create it
  55.  
  56. (if (OR (exists @default-dest) (exists (cat @default-dest ".info")))
  57.    (abort (#dest-exists-msg @default-dest))
  58.    (
  59.       (makedir @default-dest (infos))
  60.       (onerror
  61.          (run
  62.             ("Delete \"%s\" \"%s\" ALL FORCE"
  63.                @default-dest (cat @default-dest ".info")
  64.             )
  65.          )
  66.       )
  67.    )
  68. )
  69.  
  70.  
  71. ; Copy program files to destination directory
  72.  
  73. (copyfiles
  74.    (source "hidden")
  75.    (dest @default-dest)
  76.    (pattern "~(JoyRide#?)")
  77.    (infos)
  78.    (help @copyfiles-help)
  79. )
  80.  
  81.  
  82. ; Copy manual to destination directory
  83.  
  84. (copyfiles
  85.    (source "Manual")
  86.    (dest @default-dest)
  87.    (infos)
  88.    (help @copyfiles-help)
  89. )
  90.  
  91.  
  92. ; Copy Okie Dokie to destination directory
  93.  
  94. (copyfiles
  95.    (source "")
  96.    (dest @default-dest)
  97.    (pattern "Okie Dokie")
  98.    (infos)
  99.    (help @copyfiles-help)
  100. )
  101.  
  102.  
  103. ; Install the Atari 2600 library
  104.  
  105. (copylib
  106.    (source "atari2600.library")
  107.    (dest "LIBS:")
  108. )
  109.  
  110.  
  111. ; Ask where the user wants to put JoyRide
  112.  
  113. (select
  114.    (askchoice
  115.       (prompt #ask-joyride-prompt)
  116.       (choices #joyride-choice-0 #joyride-choice-1 #joyride-choice-2)
  117.       (help #ask-joyride-help)
  118.    )
  119.    (copylib (source "hidden/JoyRide") (dest "SYS:WBStartup") (infos))
  120.    (copylib (source "hidden/JoyRide") (dest "SYS:Tools/Commodities") (infos))
  121.    0
  122. )
  123.  
  124.  
  125.